﻿@{
    this.ViewBag.Title = "Silverlight Biggest Box";
}
@using Songhay.Web.Mvc.Extensions
@using Songhay.Web.Mvc.Models
@model SilverlightModel

<div id="ClientFlow" class="@ViewBag.ClientViewCssClass">
    @Html.SilverlightControlHost(Model)
    <form id="AppProperties" action="#" onsubmit="return false;">
        <fieldset>
            <legend></legend>
            @foreach (var pair in Model.ClientApplicationProperties)
            {
                <input id="@pair.Key" type="hidden" value="@pair.Value" />
            }
        </fieldset>
    </form>
</div>

@section StyleContent
{
    <style type="text/css">
        html, body {
            height: 100%;
            overflow: auto;
        }

        body {
            padding: 0;
            margin: 0;
        }

        #SilverlightControlHost {
            height: 100%;
            position: fixed;
            width: 100%;
        }

            #SilverlightControlHost object a {
                text-align: center;
                text-decoration: none;
            }

            #SilverlightControlHost pre.Error {
                background-color: #fff;
                border: 1px solid Red;
                color: Red;
                font-size: 1.8em;
                font-weight: bold;
                height: 600px;
                margin: 0;
                margin-right: auto;
                overflow: auto;
                padding: 1em;
                width: 960px;
            }

            #SilverlightControlHost object a img {
                border-style: none;
            }

            #SilverlightControlHost #_sl_historyFrame {
                border: 0px;
                height: 0px;
                visibility: hidden;
                width: 0px;
            }

        #ClientFlow {
            margin-left: auto;
            margin-right: auto;
        }
    </style>
}
